package vn.csp.util;

import java.util.Enumeration;
import java.util.ResourceBundle;

public class ThongSo {
	//** Các thông số cấu hình chung của ứng dụng*/
	public String URL= "";
	public String CODE_PHP = "";
	public String URL_DOWN="";
	public String EMAIL_ADMIN="";
	public enum YEU_CAU {
	        THE_LOAI_GAME,
	        GAME_TAI_NHIEU,
	        GAME_DUONG_DAN,
	        GAME_MOI_NHAT,
	        GAME_HAY_NHAT
    }
	 
	public ThongSo(){
		docThongSoTuTepTinCauHinh();
	}
	
	public void docThongSoTuTepTinCauHinh() {
		ResourceBundle bundle = ResourceBundle.getBundle("vn.csp.util.loctb");
		Enumeration<String> keys = bundle.getKeys();
		while (keys.hasMoreElements()) {
			String key = keys.nextElement();
			if(key.equals("URL")){
				String value = bundle.getString(key);
				URL = value;
			}else if(key.equals("CODE_PHP")){
				String value = bundle.getString(key);
				CODE_PHP = value;
			}
			else if(key.equals("URL_DOWN")){
				String value = bundle.getString(key);
				URL_DOWN = value;
			}
			else if(key.equals("EMAIL_ADMIN")){
				String value = bundle.getString(key);
				EMAIL_ADMIN = value;
			}
		}
	}
}
